1. Field
The present disclosure relates to processing systems having shared memory, more particularly to method and apparatus for clearing semaphore reservations.
2. Background
Computers have revolutionized the electronics industry by enabling sophisticated processing tasks to be performed with just a few strokes of a keypad. These sophisticated tasks involve an incredibly high number of complex components that communicate with one another in a fast and efficient manner using a bus. A bus is a channel or path between components in a computer.
Many buses resident in a computer have traditionally been implemented as shared buses. A shared bus provides a means for any number of components to communicate over a common path or channel. In recent years, shared bus technology has been replaced to a large extent by point-to-point switching connections. Point-to-point switching connections provide a direct connection between two components on the bus while they are communicating with each other. Multiple direct links may be used to allow several components to communicate at the same time. A bus arbiter may be used to manage communications over the bus.
A computer implementing a bus architecture may include a number of processing components connected to memory. The memory may be divided into regions either by the system designer or dynamically during operation. Each processing component may have its own dedicated memory region. “Shared memory regions,” on the other hand, are memory regions that may be accessed by multiple processing. A semaphore may be used to manage access to the shared memory regions. A “semaphore” is a hardware or software flag, residing in a shared memory location, that indicates the accessibility of a shared resource. A processing component that needs access to the shared memory region may read the semaphore to determine the accessibility of the shared memory region. If the semaphore indicates that the shared memory region is available, then the processing component may set the semaphore to indicate that the shared memory region is locked, and proceed to access the memory.
When the processing component reads the semaphore, the memory creates a “reservation” for the processing component to the shared memory region. The reservation is cleared once the processing component sets the semaphore to lock the shared memory region. However, if the processor is interrupted before it has a chance to set the semaphore, the reservation must be cleared. An efficient means for clearing the semaphore reservation is desirable.